package com.bh.fee.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bh.common.core.text.Convert;
import com.bh.fee.domain.JcFeeTypeOrganization;
import com.bh.fee.mapper.JcFeeTypeOrganizationMapper;
import com.bh.fee.service.IJcFeeTypeOrganizationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

/**
 * 网点费用类型Service业务层处理
 * 
 * @author slx
 * @date 2023-05-21
 */
@Service
public class JcFeeTypeOrganizationServiceImpl extends ServiceImpl<JcFeeTypeOrganizationMapper, JcFeeTypeOrganization> implements IJcFeeTypeOrganizationService
{
    @Autowired
    private JcFeeTypeOrganizationMapper jcFeeTypeOrganizationMapper;

    /**
     * 查询网点费用类型
     * 
     * @param jcFeeTypeId 网点费用类型主键
     * @return 网点费用类型
     */
    @Override
    public JcFeeTypeOrganization selectJcFeeTypeOrganizationByJcFeeTypeId(Long jcFeeTypeId)
    {
        return jcFeeTypeOrganizationMapper.selectById(jcFeeTypeId);
    }

    /**
     * 查询网点费用类型列表
     * 
     * @param jcFeeTypeOrganization 网点费用类型
     * @return 网点费用类型
     */
    @Override
    public List<JcFeeTypeOrganization> selectJcFeeTypeOrganizationList(JcFeeTypeOrganization jcFeeTypeOrganization)
    {
        return jcFeeTypeOrganizationMapper.selectJcFeeTypeOrganizationList(jcFeeTypeOrganization);
    }

    /**
     * 新增网点费用类型
     * 
     * @param jcFeeTypeOrganization 网点费用类型
     * @return 结果
     */
    @Override
    public int insertJcFeeTypeOrganization(JcFeeTypeOrganization jcFeeTypeOrganization)
    {
        return jcFeeTypeOrganizationMapper.insert(jcFeeTypeOrganization);
    }

    /**
     * 修改网点费用类型
     * 
     * @param jcFeeTypeOrganization 网点费用类型
     * @return 结果
     */
    @Override
    public int updateJcFeeTypeOrganization(JcFeeTypeOrganization jcFeeTypeOrganization)
    {
        return jcFeeTypeOrganizationMapper.updateById(jcFeeTypeOrganization);
    }

    /**
     * 批量删除网点费用类型
     * 
     * @param jcFeeTypeIds 需要删除的网点费用类型主键
     * @return 结果
     */
    @Override
    public int deleteJcFeeTypeOrganizationByJcFeeTypeIds(String jcFeeTypeIds)
    {
        return jcFeeTypeOrganizationMapper.deleteBatchIds(Arrays.asList(Convert.toStrArray(jcFeeTypeIds)));
    }

    /**
     * 删除网点费用类型信息
     * 
     * @param jcFeeTypeId 网点费用类型主键
     * @return 结果
     */
    @Override
    public int deleteJcFeeTypeOrganizationByJcFeeTypeId(Long jcFeeTypeId)
    {
        return jcFeeTypeOrganizationMapper.deleteById(jcFeeTypeId);
    }
}
